package cuckoo.test;

import cuckoo.aop.anno.onAfter;
import cuckoo.aop.anno.onBefore;
import cuckoo.aop.anno.onException;
import cuckoo.ioc.annotation.Resource;

@Resource
@onBefore(MyInterceptor.class)
public class Hello2 implements Say {

	@Resource
	private HelloService helloService;

	@Override
	@onAfter(MyInterceptor2.class)
	public void say(String name) {
		helloService.say();
	}

	@onException(MyInterceptor2.class)
	public void say2() {
		System.out.println("heheh");
		throw new RuntimeException("hahahahahah  hahah");
	}
}
